import request from '@/utils/request'

// 获取异常日志
export async function getExceptionLogs(data) {
  return request({
    url: '/ExceptionLog/pageQuery',
    method: 'post',
    data,
  })
}
// 获取统计信息
export async function getStatistic() {
  return request({
    url: '/comm/getStatistic',
    method: 'get',
  })
}
// 轮询视频预览接口哦
export function liveLoop(deviceId) {
  return request({
    url: '/baseDevice/videoFlow?deviceId=' + deviceId,
    method: 'get',
  })
}
// 视频回放流接口
export function historyVideo(deviceId, startTime, endTime, videoKey) {
  return request({
    url: `/baseDevice/playBack?deviceId=${deviceId}&startTime=${startTime}&endTime=${endTime}&videoKey=${videoKey}`,
    method: 'get',
  })
}
// 获取车流量统计
export function getCarTraffic(params) {
  return request({
    url: `/flowData/getCarFlow?areaNo=${params.areaNo}&startDate=${params.startDate}&endDate=${params.endDate}`,
    method: 'get',
  })
}
// 获取人流量统计
export function getPeopleTraffic(params) {
  return request({
    url: `/flowData/getPeopleFlow?areaNo=${params.areaNo}&startDate=${params.startDate}&endDate=${params.endDate}`,
    method: 'get',
  })
}
// 获取30天无出入人员记录
export async function getInActivePeople(params) {
  return request({
    url: `/baseResident/getNoEntryPage`,
    method: 'post',
    data: params,
  })
}

// 超过7人的房间
export async function getOverSevenRoomList(params) {
  return request({
    url: `/baseHouse/getMoreResidentList`,
    method: 'post',
    data: params,
  })
}
